Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This commit fixes the white corners of menus under macOS. #503

Closed
wants to merge 1 commit into from

Conversation

ggarra13
Copy link
Contributor

@ggarra13 ggarra13 commented Sep 22, 2022

MacOS menus would have two pixel white corners that would show up when the background was set to a dark color. This commit fixes that display glitch.

@ggarra13 ggarra13 closed this Sep 22, 2022
@ggarra13 ggarra13 deleted the macos_menus branch September 22, 2022 22:12
@ggarra13 ggarra13 restored the macos_menus branch September 22, 2022 22:13
@ggarra13 ggarra13 reopened this Sep 22, 2022
@Albrecht-S
Copy link
Member

Thanks for the patch. I'm not sure though if drawing extra lines and/or a rectangle is the correct solution in general and particularly in this platform agnostic way because the title say that the issue is macOS specific. However, I can believe that we can accept this anyway.

Since I can't test and verify this right now I'm leaving this to others (e.g. @ManoloFLTK ?) to decide.

@ManoloFLTK
Copy link
Contributor

I'm not keen to fix a macOS-speciic issue with platform-independent code that will also be activated on non macOS platforms.

@ggarra13
Copy link
Contributor Author

ggarra13 commented Sep 23, 2022 via email

@Albrecht-S
Copy link
Member

@ggarra13 wrote:

… the problem is also there on other platforms. You just don’t see it as windows are created blank by default there.

I agree that this might be an issue on other platforms as well (pixels that are never drawn). Is it possible to make a short and complete demo program that would show the issue on all platforms, for instance by setting a background color explicitly? One option to do so is using the command line switch -bg "color", e.g. -bg '#554433' for a dark background.

Another important point to consider: the proposed patch changes box drawing code which is applied all over the FLTK GUI, not only for menus. Backgrounds can have more than just one color, for instance the tiled stipple pattern of the plastic scheme or even a user defined image. In such cases the patch might cause other unwanted artifacts.

That all said, IMO the proposed patch is not a proper solution of this issue. A correct patch would draw the extra background pixels only:

  • on the macOS platform (maybe) and
  • in the context of menus (menu windows)

Otherwise unwanted artifacts would likely cause another regression.

Disclaimer: I didn't test anything, these are just my thoughts while reading about this issue.

@ggarra13
Copy link
Contributor Author

I am closing this pull request as I have a better fix for the menus on macOS. Please refer to the PR menuwindow_macos.

@ggarra13 ggarra13 closed this Sep 24, 2022
@ggarra13 ggarra13 deleted the macos_menus branch September 24, 2022 13:13
@ggarra13
Copy link
Contributor Author

ggarra13 commented Sep 24, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants